package com.bysc.commentservice.client;

import com.bysc.commonutils.Results;
import com.bysc.commonutils.constant.UserConstant;
import com.bysc.commonutils.vo.UserInfoVo;
import org.springframework.stereotype.Component;

import java.util.ArrayList;

@Component

public class UserInfoDegradeFeignClient implements UserClient {

    @Override
    public Results getUserInfoById(String id) {
        UserInfoVo userInfoVo = new UserInfoVo();
        userInfoVo.setAvatar(UserConstant.DEFAULT_AVATAR);
        userInfoVo.setNickname(UserConstant.DEFAULT_NIKENAME);
        userInfoVo.setTitles(new ArrayList());
        userInfoVo.setIsJoin(false);
        userInfoVo.setIsActive(false);
        return  Results.error().message("time out").data("user",userInfoVo);
    }
}


